import Vue from 'vue'
import App from './App'
import $H from 'common/request.js';
import store from 'store/index.js';

Vue.config.productionTip = false
Vue.prototype.$H=$H
Vue.prototype.$store=store
Vue.prototype.authJump=(options)=>{
	if(!store.state.token){
		uni.showToast({
			title: '请先登录',
			icon: 'none'
		});
		return uni.navigateTo({
			url:'/pages/login/login'
		})
	}
	uni.navigateTo(options)
}
Vue.prototype.authMethod=(callback)=>{
	if(!store.state.token){
		uni.showToast({
			title: '请先登录',
			icon: 'none'
		});
		return uni.navigateTo({
			url:'/pages/login/login'
		})
	}
	callback()
}
App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
